<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center yhsh_flex_0_higd"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub yhsh_fd0_0_higd'>
					<view class='flex flex-wrap align-center yhsh_fd0_0_c0_higd' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  yhsh_fd0_0_c0_c0_higd'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='yhsh_fd0_0_c1_c0_higd'>{{$t('问题详情')}}</text>
					</view>
					<view class='flex flex-wrap align-center justify-end yhsh_fd0_0_c0_higd'>

						<!-- #ifndef MP-WEIXIN -->
						<text @tap.stop="handleJumpDiy" data-type="navigateTo"
							:data-url="`/pageyhpc/yhpc/yhpcx/yhpcx?aid=${ids}&title=${title}`"
							class='yhsh_fd0_0_c2_c0_higd'>{{$t('详情')}}</text>
						<!-- #endif -->
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout yhsh_flex_1_higd">
				<view class='flex flex-wrap align-center yhsh_fd1_0_higd'>
					<view class='flex flex-wrap align-center yhsh_fd1_0_c0_higd'>
						<text>{{$t('排查时间')}}</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='yhsh_fd1_0_c1_c0_higd'>{{info.list.pcsj}}</text>
					</view>
					<view class='flex flex-wrap align-center yhsh_fd1_0_c2_higd'>
						<text class='yhsh_fd1_0_c2_c0_higd'>{{info.list.wtzt_name}}</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center yhsh_fd1_0_higd'>
					<view class='flex flex-wrap align-center yhsh_fd1_0_c0_higd'>
						<text>{{$t('排查人')}}</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='yhsh_fd1_0_c1_c0_higd'>{{info.list.user_real_name}}</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center yhsh_fd1_0_higd'>
					<view class='flex flex-wrap align-center yhsh_fd1_0_c0_higd'>
						<text>{{$t('评分分值')}}</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='yhsh_fd1_0_c1_c0_higd'>{{info.list.pf}}</text>
					</view>
				</view>
				<view class='flex align-stretch yhsh_fd1_0_higd'>
					<view class='flex align-start yhsh_fd1_0_c0_higd'>
						<text>{{$t('问题描述')}}</text>
					</view>
					<view class='flex align-stretch flex-sub'>
						<text class='yhsh_fd1_0_c1_c0_higd'>{{info.list.wtms?info.list.wtms:'无'}}</text>
					</view>
				</view>
				<template v-if=" info.list.file.length!=0">
					<view class='flex flex-wrap align-center'>
						<image class='yhsh_fd1_4_c0_higd' v-for='(child,key1) in info.list.file' :key='key1'
							@tap.stop="multiImagePreview(child,info.list.file,'')" mode="aspectFill" :src='child'>
						</image>
					</view>
				</template>

				<template v-for='(child,key1) in info.list.video'>
					<view class='flex flex-wrap align-center' :key='key1'>
						<view class="yhsh_fd1_5_c0_higd" style="position: relative;"
							@tap.stop="mixinToPlayVideo(child.path)">
							<image class='flex  yhsh_fd1_5_c0_higd' :src="child.thumb" mode="aspectFill"></image>
							<image
								style="position: absolute;width: 88rpx;height: 88rpx;left: 50%;top: 50%;margin-top: -44rpx;margin-left: -44rpx;z-index:9;"
								:src='STATIC_URL+"247.png"' mode=""></image>
						</view>
						<!-- <video class='flex  yhsh_fd1_5_c0_higd' :poster="child.thumb" :src="child.path" controls='true'
							x5-video-player-type="h5" :enable-progress-gesture='true' object-fit="fill"></video> -->

					</view>
				</template>

			</view>

			<!---flex布局flex布局结束-->
			<benben-popup v-model="popupShow1749002975746" :mask="true" :mask-close-able="true" mode='center'
				:z-index='999'>
				<!---拒绝原因flex布局开始-->
				<view class="flex flex-direction align-center benben-flex-layout yhsh_flex_2_higd">
					<text class='yhsh_fd2_0_higd'>{{$t('审核备注')}}</text>
					<view class='flex flex-wrap yhsh_fd2_1_higd'>
						<benben-textarea class='flex yhsh_input_fd2_1_higd' :placeholder="$t('请输入')" :maxlength="240"
							placeholder-style="color:#999;font-size:28rpx" v-model="shbz" />

					</view>
					<view class='flex flex-wrap align-center'>
						<button class='yhsh_fd2_2_c0_higd' @tap.stop="shFunc(2)">{{$t('不通过')}}</button>
						<button class='yhsh_fd2_2_c1_higd' @tap.stop="shFunc(1)">{{$t('通过')}}</button>
					</view>
				</view>

				<!---拒绝原因flex布局结束-->

			</benben-popup>
			<!---flex布局2flex布局开始-->
			<view class="" v-for="(items,index) in info.info" :key='index'>
				<view class="flex flex-direction align-stretch benben-flex-layout yhsh_flex_3_higd">
					<view class='flex flex-wrap align-center'>
						<text class='yhsh_fd3_0_c0_higd'>{{$t('问题整改')}}</text>
					</view>
					<view class='flex flex-wrap align-center yhsh_fd3_1_higd'>
						<view class='flex flex-wrap align-center yhsh_fd3_1_c0_higd'>
							<text>{{$t('整改时间')}}</text>
						</view>
						<view class='flex flex-wrap align-center'>
							<text class='yhsh_fd3_1_c1_c0_higd'>{{items.zg_info.update_time}}</text>
						</view>
					</view>
					<view class='flex flex-wrap align-center yhsh_fd3_1_higd'>
						<view class='flex flex-wrap align-center yhsh_fd3_1_c0_higd'>
							<text>{{$t('整改人')}}</text>
						</view>
						<view class='flex flex-wrap align-center'>
							<text class='yhsh_fd3_1_c1_c0_higd'>{{items.zg_info.user_real_name}}</text>
						</view>
					</view>
					<view class='flex align-stretch yhsh_fd3_1_higd'>
						<view class='flex align-start yhsh_fd3_1_c0_higd'>
							<text>{{$t('整改备注')}}</text>
						</view>
						<view class='flex align-stretch flex-sub'>
							<text class='yhsh_fd3_1_c1_c0_higd'>{{items.zg_info.zgyj?items.zg_info.zgyj:'无'}}</text>
						</view>
					</view>
					<template v-if=" items.zg_info.zgtp.length!=0">
						<view class='flex flex-wrap align-center yhsh_fd3_4_higd'>
							<image class='yhsh_fd3_4_c0_higd' v-for='(item,key0) in items.zg_info.zgtp' :key='key0'
								@tap.stop="multiImagePreview(item,items.zg_info.zgtp,'')" mode="aspectFill" :src='item'>
							</image>
						</view>
					</template>

					<template v-for='(item,key0) in items.zg_info.zg_video'>
						<view class='flex flex-wrap align-center' :key='key0'>

							<!-- <video class='flex  yhsh_fd3_5_c0_higd' :poster="item.thumb" :src="item.path" controls='true'
								x5-video-player-type="h5" :enable-progress-gesture='true' object-fit="fill"></video> -->
							<view class="yhsh_fd3_5_c0_higd" style="position: relative;"
								@tap.stop="mixinToPlayVideo(item.path)">
								<image class='flex  yhsh_fd3_5_c0_higd' :src="item.thumb" mode="aspectFill"></image>
								<image
									style="position: absolute;width: 88rpx;height: 88rpx;left: 50%;top: 50%;margin-top: -44rpx;margin-left: -44rpx;z-index:9;"
									:src='STATIC_URL+"247.png"' mode=""></image>
							</view>

						</view>
					</template>

					<view class='flex flex-wrap align-center' v-if="!items.sh_info.aid && type==3"
						@tap.stop="popupShow1749002975746=true">
						<button class='yhsh_fd3_6_c0_higd'>{{$t('审核')}}</button>
					</view>
				</view>
				<view class="flex flex-direction align-stretch benben-flex-layout yhsh_flex_4_higd"
					v-if="items.sh_info.aid">
					<view class='flex flex-wrap align-center'>
						<text class='yhsh_fd4_0_c0_higd'>{{$t('问题审核')}}</text>
					</view>
					<view class='flex flex-wrap align-center yhsh_fd4_1_higd'>
						<view class='flex flex-wrap align-center yhsh_fd4_1_c0_higd'>
							<text>{{$t('审核意见')}}</text>
						</view>
						<view class='flex flex-wrap align-center'>
							<text class='yhsh_fd4_1_c1_c0_higd'>{{items.sh_info.shyj}}</text>
						</view>
					</view>
					<view class='flex align-stretch yhsh_fd4_1_higd'>
						<view class='flex align-start yhsh_fd4_1_c0_higd'>
							<text>{{$t('审核备注')}}</text>
						</view>
						<view class='flex align-stretch flex-sub'>
							<text class='yhsh_fd4_1_c1_c0_higd'>{{items.sh_info.shbz?items.sh_info.shbz:'无'}}</text>
						</view>
					</view>
					<!-- 	<button class='yhsh_fd4_3_higd' @tap.stop="handleJumpDiy" data-type="back" data-url="1"
						v-if="items.sh_info.aid&&shzt!=4">{{$t('下一项')}}</button> -->
				</view>
			</view>
			<view class="flex flex-wrap align-center justify-center benben-flex-layout">
				<view class='flex flex-wrap align-center' v-if="shzt==4&&type==2">
					<button class='yhsh_fd5_0_c0_higd' @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pageyhpc/yhpc/yhzg/yhzg?id=${id}&title=${title}`">{{$t('整改')}}</button>
				</view>
			</view>

			<!---flex布局5flex布局结束-->
			<!-- #ifdef MP-WEIXIN -->
			<view class="btn-fixed" @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pageyhpc/yhpc/yhpcx/yhpcx?aid=${ids}&title=${title}`">
				详情
			</view>
			<!-- #endif -->

		</view>
	</page-body>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"popupShow1749002975746": false,
				"isopen": false,
				/** shyj【是否通过】 **/
				"shyj": "",
				/** shbz【备注】 **/
				"shbz": "",
				"info": {
					"list": {
						"user_real_name": "",
						"pf": "",
						"pcsj": "",
						"wtzt": "",
						"wtms": "",
						"video": [],
						"wtzt_name": "",
						"file": []
					},
					"zg_info": {
						"aid": "",
						"update_time": "",
						"zgyj": "",
						"user_real_name": "",
						"zg_video": [],
						"zgtp": []
					},
					"sh_info": {
						"aid": "",
						/** shyj【是否通过】 **/
						"shyj": "",
						/** shbz【备注】 **/
						"shbz": ""
					}
				},
				"id": "5",
				"title": "",
				"ids": "",
				"type": "",
				"shzt": "",
				shid: '', //要审核的aid
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			let {
				id,
				title,
				ids,
				type,
				shzt
			} = options
			if (id !== undefined) this.id = id
			if (title !== undefined) this.title = title
			if (ids !== undefined) this.ids = ids
			if (type !== undefined) this.type = type
			if (shzt !== undefined) this.shzt = shzt
			this.gethw74193f267551Func()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//审核
			async shFunc(index) {
				let obj = {
					aid: this.shid,
					shyj: index,
					shbz: this.shbz
				}
				console.log(obj)
				let data674178b3be1da = await this.$api.post(global.apiUrls.post6741961c4b8d1, {
					aid: this.shid,
					shyj: index,
					shbz: this.shbz
				});
				this.gethw74193f267551Func()
				if (data674178b3be1da.data.code != 1) {
					this.$message.info(data674178b3be1da.data.msg);
					return
				}

				let info674178b3be1da = data674178b3be1da.data;
				uni.$emit('yhsh', this.shyj)
				this.popupShow1749002975746 = false;
				this.$urouter.navigateBack(1);
			},
			//查询问题审核详情-隐患排查
			async gethw74193f267551Func() {
				//请求方法
				//数据验证

				let datainfo = await this.$api.get(global.apiUrls.post674193f267551, {
					aid: this.id
				});

				if (datainfo.data.code != 1) {
					this.$message.info(datainfo.data.msg);
					return
				}
				let infoinfo = datainfo.data;
				this.info = infoinfo.data
				let index = this.info.info.length - 1
				// console.log(index)
				this.shid = this.info.info[index].zg_info.aid
				console.log(this.shid)
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;

		.yhsh_fd5_0_c0_higd {
			border-radius: 44rpx;
			width: 686rpx;
			line-height: 88rpx;
			font-size: 32rpx;
			background: #D32A29;
			color: #fff;
			height: 88rpx;
			margin: 86rpx 0rpx 68rpx 0rpx;
		}

		.yhsh_flex_4_higd {
			padding: 28rpx 32rpx 0rpx 32rpx;
			background: rgba(255, 255, 255, 1);
			background-size: 100% auto;

			.yhsh_fd4_0_c0_higd {
				color: #333;
				font-size: 32rpx;
				line-height: 45rpx;
				margin: 0rpx 0rpx 16rpx 0rpx;
				font-weight: 700;
			}

			.yhsh_fd4_3_higd {
				border-radius: 44rpx;
				width: 686rpx;
				line-height: 88rpx;
				font-size: 32rpx;
				background: #D32A29;
				color: #fff;
				height: 88rpx;
				margin: 86rpx 0rpx 68rpx 0rpx;
			}
		}

		.yhsh_fd4_1_higd {
			line-height: 40rpx;
			color: rgba(153, 153, 153, 1);
			font-size: 28rpx;
			margin: 0rpx 0rpx 28rpx 0rpx;
		}

		.yhsh_fd4_1_c0_higd {
			width: 144rpx;
		}

		.yhsh_fd4_1_c1_c0_higd {
			color: rgba(51, 51, 51, 1);
		}

		.yhsh_flex_3_higd {
			margin: 16rpx 0rpx 16rpx 0rpx;
			background: rgba(255, 255, 255, 1);
			background-size: 100% auto;
			padding: 28rpx 32rpx 0rpx 32rpx;

			.yhsh_fd3_0_c0_higd {
				color: #333;
				font-size: 32rpx;
				line-height: 45rpx;
				margin: 0rpx 0rpx 16rpx 0rpx;
				font-weight: 700;
			}

			.yhsh_fd3_4_higd {
				margin: 0rpx 0rpx 32rpx 0rpx;

				.yhsh_fd3_4_c0_higd {
					width: 156rpx;
					height: 156rpx;
					border-radius: 8rpx;
					margin: 0rpx 16rpx 16rpx 0rpx;
				}
			}

			.yhsh_fd3_5_c0_higd {
				width: 100%;
				height: 300rpx;
				border-radius: 10rpx 10rpx 10rpx 10rpx;
			}

			.yhsh_fd3_6_c0_higd {
				border-radius: 44rpx;
				width: 686rpx;
				line-height: 88rpx;
				font-size: 32rpx;
				background: #D32A29;
				color: #fff;
				height: 88rpx;
				margin: 86rpx 0rpx 68rpx 0rpx;
			}
		}

		.yhsh_fd3_1_higd {
			line-height: 40rpx;
			color: rgba(153, 153, 153, 1);
			font-size: 28rpx;
			margin: 0rpx 0rpx 28rpx 0rpx;
		}

		.yhsh_fd3_1_c0_higd {
			width: 144rpx;
		}

		.yhsh_fd3_1_c1_c0_higd {
			color: rgba(51, 51, 51, 1);
		}

		.yhsh_flex_2_higd {
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			background: rgba(255, 255, 255, 1);
			padding: 40rpx 24rpx 24rpx 24rpx;
			width: 616rpx;

			.yhsh_fd2_0_higd {
				line-height: 44rpx;
				font-size: 32rpx;
				font-weight: 500;
				color: #333333;
			}

			.yhsh_fd2_1_higd {
				width: 568rpx;
				border-radius: 10rpx 10rpx 10rpx 10rpx;
				padding: 24rpx;
				margin: 31rpx 50rpx 48rpx 50rpx;
				background: rgba(246, 246, 246, 1);
				background-size: 100% auto;

				.yhsh_input_fd2_1_higd {
					width: 100%;
					height: 400rpx;
					font-size: 28rpx;
					font-weight: 400;
					color: #333;
					white-space: pre-wrap;
					border-radius: 16rpx 16rpx 16rpx 16rpx;
					background: rgba(246, 246, 246, 1);
				}
			}

			.yhsh_fd2_2_c0_higd {
				border-radius: 36rpx 36rpx 36rpx 36rpx;
				font-size: 28rpx;
				background: rgba(211, 42, 41, 1);
				color: var(--benbenFontColor3);
				padding: 0rpx 24rpx 0rpx 24rpx;
				margin: 0rpx 12rpx 0rpx 0rpx;
				width: 200rpx;
				height: 72rpx;
			}

			.yhsh_fd2_2_c1_higd {
				border-radius: 36rpx 36rpx 36rpx 36rpx;
				font-size: 28rpx;
				background: rgba(211, 42, 41, 1);
				color: rgba(255, 255, 255, 1);
				padding: 0rpx 61rpx 0rpx 61rpx;
				margin: 0rpx 0rpx 0rpx 12rpx;
				width: 200rpx;
				height: 72rpx;
			}
		}

		.yhsh_flex_1_higd {
			margin: 16rpx 0rpx 16rpx 0rpx;
			background: rgba(255, 255, 255, 1);
			background-size: 100% auto;
			padding: 28rpx 32rpx 36rpx 32rpx;

			.yhsh_fd1_4_c0_higd {
				width: 156rpx;
				height: 156rpx;
				border-radius: 8rpx;
				margin: 0rpx 16rpx 16rpx 0rpx;
			}

			.yhsh_fd1_5_c0_higd {
				width: 100%;
				height: 300rpx;
				border-radius: 10rpx 10rpx 10rpx 10rpx;
			}
		}

		.yhsh_fd1_0_higd {
			line-height: 40rpx;
			color: rgba(153, 153, 153, 1);
			font-size: 28rpx;
			margin: 0rpx 0rpx 28rpx 0rpx;

			.yhsh_fd1_0_c2_higd {
				margin: 0rpx 0rpx 0rpx auto;
				height: 40rpx;
				width: 96rpx;
				border-radius: 8rpx;
				border: 1px solid var(--benbenbdColor3);

				.yhsh_fd1_0_c2_c0_higd {
					color: var(--benbenFontColor6);
					font-size: 24rpx;
					width: 96rpx;
					text-align: center;
					line-height: 40rpx;
				}
			}
		}

		.yhsh_fd1_0_c0_higd {
			width: 144rpx;
		}

		.yhsh_fd1_0_c1_c0_higd {
			color: rgba(51, 51, 51, 1);
		}

		.yhsh_flex_0_higd {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			z-index: 10;
			top: 0rpx;
			background: #fff;
			background-size: 100% auto !important;

			.yhsh_fd0_0_higd {
				padding: 0rpx 32rpx 0rpx 32rpx;

				.yhsh_fd0_0_c1_c0_higd {
					font-size: 36rpx;
					font-weight: 700;
					color: #333333;
					line-height: 50rpx;
				}
			}
		}

		.yhsh_fd0_0_c0_higd {
			width: 120rpx;

			.yhsh_fd0_0_c0_c0_higd {
				font-size: 36rpx;
				color: #333;
			}
		}

		.yhsh_fd0_0_c2_c0_higd {
			font-size: 32rpx;
			color: rgba(211, 42, 41, 1);
		}
	}
</style>
